﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class TacGiaService
    {
        public static List<TacGiaDTO> LayDanhSachTacGia()
        {
            List<TacGiaDTO> list = new List<TacGiaDTO>();
            try
            {
                TacGiaRepository tacgiaDAO = new TacGiaRepository();
                list = tacgiaDAO.LayDanhSachTacGia();
            }
            catch (System.Exception)
            {
            }
            return list;
        }

        public static void ThemTacGia(TacGiaDTO tacgiaDTO)
        {
            try
            {
                TacGiaRepository tacgiaDAO = new TacGiaRepository();
                tacgiaDAO.ThemTacGia(tacgiaDTO);
            }
            catch (System.Exception)
            {
            }
        }

        public void CapNhatTacGia(TacGiaDTO tacgiaDTO)
        {
            try
            {
                TacGiaRepository tacgiaDAO = new TacGiaRepository();
                tacgiaDAO.CapNhatTacGia(tacgiaDTO);
            }
            catch (System.Exception)
            {
            }
        }
    }
}
